package com.peaksport.pkms.leanrtest1.controller;

import javax.ws.rs.core.MediaType;

import org.apache.servicecomb.provider.rest.common.RestSchema;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.peaksport.framework.base.controller.BaseController;
import com.peaksport.framework.exception.PKDevException;
import com.peaksport.pkms.leanrtest1.service.TestPackSaga1Service;

/**
 * 
 *
 * @author jinbin_guo 2019年5月12日
 *
 */
@RestSchema(schemaId="pkms-test-pack-saga")
@RequestMapping(value="test/pack/saga",produces=MediaType.APPLICATION_JSON)
public class TestPackSaga1Controller extends BaseController{

	@Autowired
	private TestPackSaga1Service service;
	@GetMapping("testAuditBillEntry")
	public String testAuditBillEntry(@RequestParam String billId, @RequestParam boolean isException,@RequestParam boolean isExceptionInCancel) {
		service.auditBillEntry(billId, isException,isExceptionInCancel);
	//	if (isExceptionInCancel) throw PKDevException.throwException("异常发生再server2.controller中");
		return "完成审核分录...";
	}
	
}
